<?php

//获取关键字

    header("Access-Control-Allow-Origin: *");
    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
    include "../../../config.php";






    $_setting=select_lines_all_items($table_prefix."facebook_setting",'nid asc',"1 =1 ",'1');


if ($_REQUEST['type']=='speaker')
{
    //$_setting[0]['wedding_keyword']  字符串转换成数组
    $_setting[0]['speaker_keyword']  =explode(";",$_setting[0]['speaker_keyword']);
    //在所有的数组中，随机选择一个
    $_keyword=$_setting[0]['speaker_keyword'][array_rand($_setting[0]['speaker_keyword'])];
}
else
{
    //$_setting[0]['wedding_keyword']  字符串转换成数组
    $_setting[0]['wedding_keyword']  =explode(";",$_setting[0]['wedding_keyword']);
    //在所有的数组中，随机选择一个
    $_keyword=$_setting[0]['wedding_keyword'][array_rand($_setting[0]['wedding_keyword'])];
}





$data=$_keyword;
$arr['status'] = 200;
$arr['info'] = $data;
die(json_encode($arr));



?>

